# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=Net-IP
pkgname=perl-${_realname}
pkgver=1.26
pkgrel=2
pkgdesc="Perl Module:  Easy manipulation of IPv4 and IPv6 addresses"
arch=('any')
license=('PerlArtistic')
url="http://search.cpan.org/dist/${_realname}/"
groups=('perl-modules')
depends=('perl>=5.10.0')
options=(!emptydirs)
source=(http://www.cpan.org/authors/id/M/MA/MANU/${_realname}-${pkgver}.tar.gz)
md5sums=('3a98e3ac45d69ea38a63a7e678bd716d')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}
